<?php
	require_once("oj-header.php");

	echo "<title>HUST Online Judge WebBoard >> New Thread</title>";
	if (!isset($_SESSION['user_id'])){
		echo "<a href=../loginpage.php>登录再试吧！</a>";
		require_once("../oj-footer.php");
		exit(0);
	}
?>


<h3 class="page-title">新主题</h3>
<form class="new-topic form-horizontal" action="post.php?action=new" method="POST" >
    <div class="form-group">
        <label class="control-label col-sm-5" for="pid">题号</label>
        <div class="col-sm-7">
            <input class="form-control" type="text" name="pid" value='<?php echo $_GET['pid']; ?>' id="pid"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-5" for="title">标题</label>
        <div class="col-sm-7">
            <input class="form-control" type="text" name="title" id="title"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-5" for="content">内容</label>
        <div class="col-sm-7">
            <textarea class="form-control" rows="10" cols="10" id="content" name="content"></textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-5 col-sm-7">
            <button type="submit" class="btn btn-primary">提交</button>
        </div>
    </div>
</form>

<?php require_once("../oj-footer.php")?>
